/**
 * @Author: hxr
 * @Date: 2019/9/19
 * @Last Modified by:   hxr
 * @Last Modified time: 2019-09-19 16:10:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 班组查询分页
export const getWorkerGroups = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/workgroups`, {
    params
  });
// 不分页
export const getWorkerGroupsNopage = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/workgroups/Nopage`, {
    params
  });
// 班组新增
export const addWorkerGroups = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/basedata/workgroups`, params);
// 班组编辑
export const editWorkerGroups = (params, id) => axios.put(`${SERVER.DMSCLOUD_REPAIR}/basedata/workgroups/${id}`, params);
// 查询部门下拉框
export const getOrgList = params =>
  axios.get(`${SERVER.SYSMANAGE}/org/getOrgByOrgType`, {
    params
  });
// 删除班组
export const deleteWorkgroup = (params, id) => axios.delete(`${SERVER.DMSCLOUD_REPAIR}/basedata/workgroups/deleteWorkgroup/${id}`, params);
